<template>
  <div class="content">
    <page-header sub-title="美团外卖优惠券"></page-header>
    <div style="padding-top: 10px;padding-bottom: 10px;margin: auto;">
      <img width="100%" src="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a53b2bc0-86af-4019-917d-0994ec60066d/a8e004e5-4eb4-4b13-8812-e8c3c011f4f7.png" >
      <a-tabs default-active-key="2">
        <a-tab-pane key="1">
          <span slot="tab">
            <a-icon type="paper-clip" />
            网页版
          </span>
          <couponCard1 class="coupon-card1" v-for="(item,index) in webData"
            :title="item.title"
            :cover="item.cover"
            :introduce="item.introduce"
            @cardClick="global.openUrl(item.url)"
            @btnClick="global.openUrl(item.url)"/>
        </a-tab-pane>
        <a-tab-pane key="2">
          <span slot="tab">
            <a-icon type="wechat" />
            小程序版
          </span>
          <coupon-card
             v-for="(item,index) in miniData"
             style="width:2.2rem;margin: 0 auto 0.2rem auto;"
             theme="mtwm"
             :title="item.title"
             :content="item.content"
             @click="modalImage=item.image;modalTitle=item.title;modalVisible=true"></coupon-card>
        </a-tab-pane>
      </a-tabs>
    </div>
    <a-modal
          v-model="modalVisible"
          closable
          centered
          :footer="null">
          <p style="font-size: 0.1rem;font-weight: 700;">{{modalTitle}}</p>
          <img width="100%" :src="modalImage" >
    </a-modal>

  </div>
</template>

<script>
  import couponCard from '@/components/common/coupon-card/coupon-card.vue'
  import couponCard1 from '@/components/common/coupon-card/coupon-card1.vue'
  export default {
    components:{
      couponCard,
      couponCard1
    },
    head() {
      return {
        title: '小R资源 | 美团外卖优惠券',
        meta: [
          {
            name: 'keywords',
            content: '美团外卖优惠券,美团外卖天天领,美团优惠券商城,抢18元神券'
          },
          {
            name: 'description',
            content: '免费领取美团外卖优惠券。美团外卖红包来自哪里？'
          }
        ]
      }
    },
    data() {
      return {
        // 网页版活动
        webData: [
          {
            title: '美团外卖天天领',
            cover: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a53b2bc0-86af-4019-917d-0994ec60066d/5a51f9e8-af07-4535-9d74-00fa5c6d9bbc.jpg',
            url: 'http://dpurl.cn/lA0YuGxz',
            introduce: '每周三领9元大红包',
          },
          {
            title: '超市便利红包',
            cover: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a53b2bc0-86af-4019-917d-0994ec60066d/edf18109-06d9-4915-b884-ceb3ee73a029.jpg',
            url: 'http://dpurl.cn/J30yuGiz',
            introduce: '新用户额外奖励6元红包',
          },
          {
            title: '品质好店专享优惠',
            cover: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a53b2bc0-86af-4019-917d-0994ec60066d/a254c999-d530-4062-afbc-06b54ee50aa6.jpg',
            url: 'http://dpurl.cn/oA0TuGXz',
            introduce: '外卖也要吃好的！',
          }
        ],
        // 小程序活动
        miniData: [
          {
            title: '美团外卖红包天天领',
            content: '66元',
            image: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a53b2bc0-86af-4019-917d-0994ec60066d/be6907be-52bc-4029-8d0c-c7e38c7ea5a3.jpeg',
          },
          {
            title: '抢18元神券·天天领',
            content: '110元',
            image: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a53b2bc0-86af-4019-917d-0994ec60066d/39dd339a-1027-48a1-b540-018d00c042a2.jpeg',
          },
          {
            title: '美团新人红包',
            content: '新人15减14',
            image: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a53b2bc0-86af-4019-917d-0994ec60066d/fe5dda35-7d86-4411-be27-447aa4c9777a.jpeg',
          },
          {
            title: '闪购·大额购物优惠',
            content: '50元',
            image: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a53b2bc0-86af-4019-917d-0994ec60066d/60010c45-7626-4eb4-8a9f-a321e1ae9d2c.jpeg',
          },
          {
            title: '美团优惠券商城',
            content: '86元',
            image: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a53b2bc0-86af-4019-917d-0994ec60066d/9cdb27dd-93de-4d91-b3ed-e1408e068e9f.jpeg',
          },
          {
            title: '美团酒店大额红包',
            content: '25元',
            image: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a53b2bc0-86af-4019-917d-0994ec60066d/b11fd7d0-cd4b-477f-8e20-8a7bd74b9b5c.jpeg',
          },
        ],
        modalVisible: false,
        modalImage: '',
        modalTitle: '',
      }
    },
    created() {
    },
    methods: {
    }
  }
</script>

<style scoped>
  .content {
    width: 100%;
  }
  .coupon-card1 {
    width: 90%;
    margin: 0 auto 0.2rem auto;
  }
</style>
